﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Formation_Entreprise
{
    public partial class frmSelectFormation : Form
    {
        objSelectFormation _methodes;

        public frmSelectFormation()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            _methodes = new objSelectFormation();

            foreach (string s in _methodes.getSelectFormation())
            {
                cboFormation.Items.Add(s);
            }

        }

        private void cboEntreprise_SelectedIndexChanged(object sender, EventArgs e)
        {
            txtHeure.Text=_methodes.getSelectFormation(cboFormation.Text)[0].ToString(); 
            txtLangue.Text=_methodes.getSelectFormation(cboFormation.Text)[1].ToString();
            txtDescription.Text = _methodes.getSelectFormation(cboFormation.Text)[2].ToString();
            txtMontant.Text = _methodes.getSelectFormation(cboFormation.Text)[3].ToString();
            txtNomFormateur.Text = _methodes.getSelectNomFormateur(cboFormation.Text);
        }
    }
}
